import { CHANGE_BANNER_LIST, CHANGE_PRO_LIST } from '../types'
import { Map } from 'immutable'


const reducer = (state = Map({
  bannerList: [],
  proList: []
}), { type, payload }) => {
  switch (type) {
    case CHANGE_BANNER_LIST:
      // return { ...state, bannerList: payload }

      return state.set('bannerList', payload)

    case CHANGE_PRO_LIST:
      // return { ...state, proList: payload }
      return state.set('proList', payload)

    default:
      return state
  }
}

export default reducer
